//
//  MBProgressHUD+creator.m
//  Eventor
//
//  Created by jimple on 14-6-5.
//  Copyright (c) 2014年 Eventor. All rights reserved.
//

#import "MBProgressHUD+creator.h"

@implementation MBProgressHUD (creator)

+ (MBProgressHUD *)createInView:(UIView *)view detailText:(NSString *)detailText
{
	MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:view animated:YES];
	hud.animationType = MBProgressHUDAnimationFade;
	hud.mode = MBProgressHUDModeIndeterminate;
	hud.labelText = detailText;
	hud.dimBackground = YES;
    return hud;
}

+(MBProgressHUD *) showTextInView:(UIView *) view detailText:(NSString *)detailText {
	MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:view animated:YES];
	
	hud.mode = MBProgressHUDModeText;
	hud.labelText = detailText;
	hud.margin = 10.f;
	hud.removeFromSuperViewOnHide = YES;
	
	[hud hide:YES afterDelay:3];
	
	return hud;
}

@end
